/* 容器样式 */
.invoice-container {
  position: relative;
  padding: 20rpx;
  background-color: #f5f5f5;
}

/* 纸质纹理背景 */
.paper-texture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
  background-image: 
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 20rpx 20rpx;
}

/* 发票主体 */
.invoice-paper {
  position: relative;
  background-color: #faf8f1;
  padding: 40rpx;
  border-radius: 8rpx;
  box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.1);
  z-index: 1;
  /* 做旧效果 */
  filter: sepia(5%) contrast(95%) brightness(105%);
}

/* 波浪线 */
.wave-lines {
  position: relative;
  height: 40rpx;
  margin: 20rpx 0;
}
.wave-line {
  height: 2rpx;
  background: repeating-linear-gradient(
    90deg,
    #999,
    #999 10rpx,
    transparent 10rpx,
    transparent 20rpx
  );
  position: relative;
  transform: rotate(-0.5deg);
}
.wave-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #999,
    #999 10rpx,
    transparent 10rpx,
    transparent 20rpx
  );
  transform: rotate(1deg);
  opacity: 0.7;
}
.top-wave {
  margin-bottom: 20rpx;
}
.bottom-wave {
  margin-top: 20rpx;
  transform: rotate(0.5deg);
}

/* 发票头部 */
.invoice-header {
  text-align: center;
  margin-bottom: 30rpx;
  border-bottom: 2rpx dashed #999;
  padding-bottom: 20rpx;
}
.invoice-title {
  display: block;
  font-size: 48rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 10rpx;
}
.invoice-type {
  display: block;
  font-size: 36rpx;
  color: #333;
}

/* 发票代码和号码 */
.invoice-code {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  margin-bottom: 30rpx;
  padding: 10rpx 0;
  border-bottom: 1rpx solid #ccc;
}
.invoice-code text {
  font-size: 28rpx;
  color: #333;
}

/* 区域样式 */
.invoice-section {
  margin-bottom: 30rpx;
}
.section-title {
  display: block;
  font-size: 32rpx;
  font-weight: bold;
  margin-bottom: 10rpx;
  color: #333;
}
.section-content {
  padding: 15rpx;
  border: 1rpx solid #ddd;
  border-radius: 4rpx;
}
.section-content text {
  display: block;
  font-size: 28rpx;
  margin-bottom: 8rpx;
  color: #333;
}

/* 表格样式 */
.invoice-table {
  margin-bottom: 30rpx;
}
.table-header {
  display: flex;
  background-color: #f5f5f5;
  border: 1rpx solid #ddd;
  padding: 10rpx 0;
}
.table-header text {
  flex: 1;
  text-align: center;
  font-size: 24rpx;
  color: #333;
}
.table-row {
  display: flex;
  border-left: 1rpx solid #ddd;
  border-right: 1rpx solid #ddd;
  border-bottom: 1rpx solid #ddd;
  padding: 10rpx 0;
}
.table-row text {
  flex: 1;
  text-align: center;
  font-size: 24rpx;
  color: #333;
}
.col-goods { flex: 3; }
.col-spec { flex: 1; }
.col-unit { flex: 1; }
.col-quantity { flex: 1; }
.col-price { flex: 1.5; }
.col-amount { flex: 1.5; }
.col-tax-rate { flex: 1; }
.col-tax { flex: 1.5; }

.table-summary {
  margin-top: 20rpx;
  padding: 15rpx;
  border: 1rpx solid #ddd;
  text-align: right;
}
.table-summary text {
  display: block;
  font-size: 28rpx;
  margin-bottom: 8rpx;
  color: #333;
}

/* 备注 */
.invoice-notes {
  margin-bottom: 30rpx;
}
.invoice-notes text {
  display: block;
  padding: 15rpx;
  border: 1rpx solid #ddd;
  font-size: 28rpx;
  color: #333;
}

/* 印章 */
.invoice-stamp {
  position: absolute;
  right: 40rpx;
  bottom: 40rpx;
  width: 150rpx;
  height: 150rpx;
  border-radius: 50%;
  border: 4rpx solid #ff0000;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-15deg);
  opacity: 0.8;
}
.invoice-stamp text {
  font-size: 24rpx;
  color: #ff0000;
  font-weight: bold;
}